package com.zyh.A;

import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        double money2 = 0;
        Scanner sc = new Scanner(System.in);
        double money = sc.nextDouble();
        int year = sc.nextInt();
        final double RATE1 = 0.0225;
        final double RATE2 = 0.027;
        final double RATE3 = 0.0325;
        final double RATE5 = 0.036;
        System.out.println("请输入存入的金额：");
        if (money > 1000) {
            System.out.println("请输入存期(1年，2年，3年，5年)：");
            if (year == 1) {
                money2 = money + money * RATE1 * year;
            }
            if (year == 2) {
                money2 = money + money * RATE2 * year;
            }
            if (year == 3) {
                money2 = money + money * RATE3 * year;
            }
            if (year == 5) {
                money2 = money + money * RATE5 * year;
            }
            else {
                System.out.println("请输入正确数据");
            }
            System.out.println("到期后得到的本息总额是：" + money2);
        }
        else {
            System.out.println("1000起存！");
        }
    }
}
